package com.bazaaroid.server.gae.core.ioc.module;

import com.bazaaroid.server.gae.core.dao.UserDAO;
import com.bazaaroid.server.gae.core.dao.client.ClientDAO;
import com.bazaaroid.server.gae.core.dao.client.impl.JDOClientDAOImpl;
import com.bazaaroid.server.gae.core.dao.impl.JDOUserDAOImpl;
import com.bazaaroid.server.gae.core.dao.partner.*;
import com.bazaaroid.server.gae.core.dao.partner.impl.*;
import com.bazaaroid.server.gae.core.persistence.PMF;
import com.bazaaroid.server.gae.core.persistence.impl.PMFImpl;
import com.google.inject.AbstractModule;
import com.google.inject.Singleton;

public class DatastoreModule extends AbstractModule {

	@Override
	protected void configure() {
		bind(PMF.class).to(PMFImpl.class).in(Singleton.class);

		bind(UserDAO.class).to(JDOUserDAOImpl.class).in(Singleton.class);
		bind(ClientDAO.class).to(JDOClientDAOImpl.class).in(Singleton.class);
		bind(PartnerDAO.class).to(JDOPartnerDAOImpl.class).in(Singleton.class);
		bind(LocationDAO.class).to(JDOLocationDAOImpl.class).in(Singleton.class);
		bind(CategoryDAO.class).to(JDOCategoryDAOImpl.class).in(Singleton.class);
		bind(TagDAO.class).to(JDOTagDAOImpl.class).in(Singleton.class);
		bind(ProductDAO.class).to(JDOProductDAOImpl.class).in(Singleton.class);
		bind(DiscountDAO.class).to(JDODiscountDAOImpl.class).in(Singleton.class);
	}
}
